package com.njym.java.security.app.biz;

import com.github.pagehelper.PageHelper;
import com.njym.java.security.app.entity.PaymentRecord;
import com.njym.java.security.app.entity.PaymentRecordVo;
import com.njym.java.security.app.mapper.PaymentRecordMapper;
import com.njym.java.security.common.biz.BaseBiz;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 
 *
 * @author zhy
 * @email ${email}
 * @date 2019-11-30 14:09:49
 */
@Service
public class PaymentRecordBiz extends BaseBiz<PaymentRecordMapper, PaymentRecord> {

	public PaymentRecord getByoutTradeNo(String outTradeNo){
		return mapper.getByoutTradeNo(outTradeNo);
	}

	public List<PaymentRecordVo> queryList(Integer page, Integer limit,Integer chargeUserId){
		PageHelper.startPage(page, limit);
		return mapper.queryList(chargeUserId);
	}

	public int countList(Integer chargeUserId){
		return mapper.countList(chargeUserId);
	}

    public Double getTotals() {
		return mapper.getTotals();
    }

	public List<PaymentRecordVo> getTotalsByPerson(Integer page, Integer limit, String name) {
		int index = page*limit;
		return mapper.getTotalsByPerson(index,limit,name);
	}

	public Double getDailis() {
		return mapper.getDailis();
	}

    public List<PaymentRecordVo> getPayment(String userId) {
		return mapper.getPayment(userId);
    }
}